$(function(){
  $('.select-item').click(function () {
      $('.select-item').removeClass('select-active');
      $(this).addClass('select-active');
      $('.query-window').show();
  });

  $('.query-delete').click(function () {
      $('.query-window').hide();
  })
});
$(function() {
    $(".zhgl-map-tab li").on("click", function() {
        var liIndex = $(this).index();
        $(".info-header .info-header-container").hide();
        $(".info-header .info-header-container").eq(liIndex).show();
        $(".info-content .info-content-container").hide();
        $(".info-content .info-content-container").eq(liIndex).show();
    });


    $(".info-header-down").on("click", function() {
        $(".info-content").slideToggle(300);
    })

    $(".info-content-filter-result").on("click", function() {
        $(this).fadeOut(300, function() {
            $(".info-content-filter").fadeIn(300);
        })
        $(".check-detail").fadeOut(300);
    })
    $(".form-footer .confirm-btn").on("click", function() {
        $(".info-content-filter").fadeOut(300, function() {
            $(".info-content-filter-result").fadeIn(300);
            $(".check-detail").fadeIn(300);
        })
    })

    $(".check-detail").on("click", function() {
        $(".info-content .info-content-container").hide();
        $(".search-result-content").show();
    })

    $(".search-result-header .search-back").on("click", function() {
        $(".info-content .info-content-container").hide();
        $(".info-content-population").show();
    })


    $(".search-result-list li").on("click", function() {
        var newObj = {
            target: ".zhgl-map-gis",
            height: 100,
            width: 100,
            left: 560,
            top: 120
        }
        $(".search-result-list li").first().HESCGIS_Panel(newObj);
    })

    $(".zhgl-map-tool-tab div").on("click", function() {
        $(".zhgl-map-tool-tab div").removeClass("active");
        $(this).addClass("active");
    })

    $(".tool-drag-btn").dragging({
        move: 'y', //拖动方向，x y both
        randomPosition: false, //初始位置是否随机
    });

    $(".people-panel").dragging({
        move: 'both', //拖动方向，x y both
        randomPosition: false, //初始位置是否随机
        hander:'.zhgl-panel-header'
    });

    $(".record-panel").dragging({
        move: 'both', //拖动方向，x y both
        randomPosition: false, //初始位置是否随机
        hander:'.zhgl-panel-header'
    });

    $(".paiwu-panel ").dragging({
        move: 'both', //拖动方向，x y both
        randomPosition: false, //初始位置是否随机
        hander:'.tuodong'
    });
    $(".bujian-panel ").dragging({
        move: 'both', //拖动方向，x y both
        randomPosition: false, //初始位置是否随机
        hander:'.tuodong2'
    });

    $(".pull-right").on("click",function(){
        $(this).parents(".zhgl-panel-box").hide();
    })
$(".detail-right li").on("click",function(){
    if($(this).hasClass('blue-border')){
        $(this).removeClass('blue-border')
    }else {
        $(this).addClass('blue-border')
    }
});
    $(".bujianLeft-li li").on("click",function(){
        $(".bujianLeft-li li").removeClass('active-li');
       $(this).addClass('active-li');
        $(".bujianLeft-li li").find('img').attr('src','src/image/gray-yuan.png')
       $(this).find('img').attr('src','src/image/blue-yuan.png')
    });
    $(".bujian-se").on("click",function(){
        if($('.bujian-select').hasClass('dis-none')){
            $('.bujian-select').removeClass('dis-none')
        }else {
            $('.bujian-select').addClass('dis-none')
        }
    })

});

$('.jiancedian').on("click", function() {
    $(this).find('.nongdu').slideToggle(300);
});

$('.tab-list-li').on("click", function() {
    $('.small-panel').addClass('dis-none');
    $('.bujian-select').addClass('dis-none')

});
$('.paiwu').on("click", function() {

    $('.paiwu-panel').removeClass('dis-none');
});
$('.anjian').on("click", function() {
    $('.small-panel').addClass('dis-none');
    $('.people-panel').removeClass('dis-none');
});
$('.bujian').on("click", function() {

    $('.bujian-panel').removeClass('dis-none');
});
$('.btn-ding').on("click", function() {
    $('.btn-ding').removeClass('bg-blue');
    $(this).addClass('bg-blue');
});
$(function() {
    var nongduChart = echarts.init(document.getElementById('nongdu1'));


    var nongduoption = {
        backgroundColor: '#fff',

        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            top:'15%',
            containLabel: true
        },
        xAxis: [{
            type: 'category',
            boundaryGap: false,

            data: ['8:00', '10:00', '12:00', '14:00', '16:00', '18:00', '20:00', '22:00']
        }],
        yAxis: [{
            type: 'value',
            name: '浓度',
            axisTick: {
                show: false
            },



        }],
        series: [{
            name: '浓度',
            type: 'line',
            smooth: true,
            symbol: 'circle',
            symbolSize: 5,
            showSymbol: false,
            lineStyle: {
                normal: {
                    width: 1
                }
            },
            areaStyle: {
                normal: {
                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                        offset: 0,
                        color: 'rgba(137, 189, 27, 0.3)'
                    }, {
                        offset: 0.8,
                        color: 'rgba(137, 189, 27, 0)'
                    }], false),
                    shadowColor: 'rgba(0, 0, 0, 0.1)',
                    shadowBlur: 10
                }
            },
            itemStyle: {
                normal: {
                    color: 'rgb(137,189,27)',
                    borderColor: 'rgba(137,189,2,0.27)',
                    borderWidth: 12

                }
            },
            data: [220, 182, 191, 134, 150, 120, 110, 125]
        },
            {
                name: '标准',
                type: 'line',
                smooth: true,
                symbol: 'circle',
                symbolSize: 5,
                itemStyle:{
                    normal:{
                        opacity:0
                    }
                },
                label: {//图形上的文本标签
                    normal: {
                        show: true,
                        position: 'top',
                        formatter:'标准',
                        textStyle: {
                            color: '#a8aab0',
                            fontStyle: 'normal',
                            fontFamily: '微软雅黑',
                            fontSize: 12,
                        },
                    },
                },
                lineStyle: {
                    normal: {
                        color: '#eb4d4a',
                        width: 1
                    }
                },

                data: [120,120,120,120,120,120,120,120]
            },
        ]
    };



    nongduChart.setOption(nongduoption);
});
$(function() {
    var nongduChart = echarts.init(document.getElementById('nongdu2'));


    var nongduoption = {
        backgroundColor: '#fff',

        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            top:'15%',
            containLabel: true
        },
        xAxis: [{
            type: 'category',
            boundaryGap: false,

            data: ['8:00', '10:00', '12:00', '14:00', '16:00', '18:00', '20:00', '22:00']
        }],
        yAxis: [{
            type: 'value',
            name: '浓度',
            axisTick: {
                show: false
            },



        }],
        series: [{
            name: '浓度',
            type: 'line',
            smooth: true,
            symbol: 'circle',
            symbolSize: 5,
            showSymbol: false,
            lineStyle: {
                normal: {
                    width: 1
                }
            },
            areaStyle: {
                normal: {
                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                        offset: 0,
                        color: 'rgba(137, 189, 27, 0.3)'
                    }, {
                        offset: 0.8,
                        color: 'rgba(137, 189, 27, 0)'
                    }], false),
                    shadowColor: 'rgba(0, 0, 0, 0.1)',
                    shadowBlur: 10
                }
            },
            itemStyle: {
                normal: {
                    color: 'rgb(137,189,27)',
                    borderColor: 'rgba(137,189,2,0.27)',
                    borderWidth: 12

                }
            },
            data: [220, 182, 191, 134, 150, 120, 110, 125]
        },
            {
                name: '标准',
                type: 'line',
                smooth: true,
                symbol: 'circle',
                symbolSize: 5,
                itemStyle:{
                    normal:{
                        opacity:0
                    }
                },
                label: {//图形上的文本标签
                    normal: {
                        show: true,
                        position: 'top',
                        formatter:'标准',
                        textStyle: {
                            color: '#a8aab0',
                            fontStyle: 'normal',
                            fontFamily: '微软雅黑',
                            fontSize: 12,
                        },
                    },
                },
                lineStyle: {
                    normal: {
                        color: '#eb4d4a',
                        width: 1
                    }
                },

                data: [120,120,120,120,120,120,120,120]
            },
        ]
    };



    nongduChart.setOption(nongduoption);
});
$(function() {
    var nongduChart = echarts.init(document.getElementById('nongdu3'));


    var nongduoption = {
        backgroundColor: '#fff',

        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            top:'15%',
            containLabel: true
        },
        xAxis: [{
            type: 'category',
            boundaryGap: false,

            data: ['8:00', '10:00', '12:00', '14:00', '16:00', '18:00', '20:00', '22:00']
        }],
        yAxis: [{
            type: 'value',
            name: '浓度',
            axisTick: {
                show: false
            },



        }],
        series: [{
            name: '浓度',
            type: 'line',
            smooth: true,
            symbol: 'circle',
            symbolSize: 5,
            showSymbol: false,
            lineStyle: {
                normal: {
                    width: 1
                }
            },
            areaStyle: {
                normal: {
                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                        offset: 0,
                        color: 'rgba(137, 189, 27, 0.3)'
                    }, {
                        offset: 0.8,
                        color: 'rgba(137, 189, 27, 0)'
                    }], false),
                    shadowColor: 'rgba(0, 0, 0, 0.1)',
                    shadowBlur: 10
                }
            },
            itemStyle: {
                normal: {
                    color: 'rgb(137,189,27)',
                    borderColor: 'rgba(137,189,2,0.27)',
                    borderWidth: 12

                }
            },
            data: [220, 182, 191, 134, 150, 120, 110, 125]
        },
            {
                name: '标准',
                type: 'line',
                smooth: true,
                symbol: 'circle',
                symbolSize: 5,
                itemStyle:{
                    normal:{
                        opacity:0
                    }
                },
                label: {//图形上的文本标签
                    normal: {
                        show: true,
                        position: 'top',
                        formatter:'标准',
                        textStyle: {
                            color: '#a8aab0',
                            fontStyle: 'normal',
                            fontFamily: '微软雅黑',
                            fontSize: 12,
                        },
                    },
                },
                lineStyle: {
                    normal: {
                        color: '#eb4d4a',
                        width: 1
                    }
                },

                data: [120,120,120,120,120,120,120,120]
            },
        ]
    };



    nongduChart.setOption(nongduoption);
});
$(function() {
    var shuliangChart = echarts.init(document.getElementById('shuliang'));


    var shuliangoption = {
        color:['#1492ff','#1fbfd7','#42a75a','#f3a634','#eb4d4a','#8f60e3'],
        series : [
            {
                name: '访问来源',
                type: 'pie',
                radius : '65%',
                center: ['45%', '40%'],
                data:[
                    {value:13.5, name:'公共设施'},
                    {value:12.5, name:'道路交通'},
                    {value:12.5, name:'市容市貌'},
                    {value:9.5, name:'园林绿化'},
                    {value:21, name:'房屋建设'},
                    {value:30, name:'其它设备'}
                ],
                labelLine:{
                    normal:{
                        show:false,
                        length:1,
                        length2:4
                    }
                },
               label:{
                    normal:{
                        position:'outside',
                        formatter:'{c}%'
                    }
               }
            }
        ]
    };

    shuliangChart.setOption(shuliangoption);
});
$(function() {
    var qushiChart = echarts.init(document.getElementById('qushi'));


    var qushioption = {

        color:['#1492ff','#1fbfd7','#42a75a','#f3a634','#eb4d4a','#8f60e3'],

        grid: {
            left: '3%',
                right: '6%',
                bottom: '3%',
                top:'3%',
                containLabel: true
        },

        xAxis: {
            type: 'category',
                boundaryGap: false,
                data: ['201604','201605','201606','201607','201608','201609']
        },
        yAxis: {
            type: 'value'
        },
        series: [
            {
                name:'公共设施',
                type:'line',
                stack: '总量',
                data:[120, 132, 101, 134, 90, 230]
            },
            {
                name:'道路交通',
                type:'line',
                stack: '总量',
                data:[220, 182, 191, 234, 290, 330]
            },
            {
                name:'市容市貌',
                type:'line',
                stack: '总量',
                data:[150, 232, 201, 154, 190, 330]
            },
            {
                name:'园林绿化',
                type:'line',
                stack: '总量',
                data:[320, 332, 301, 334, 390, 330]
            },
            {
                name:'房屋建设',
                type:'line',
                stack: '总量',
                data:[820, 932, 901, 934, 1290, 1330]
            },
            {
                name:'其它设备',
                type:'line',
                stack: '总量',
                data:[120, 132, 101, 134, 90, 230]
            }
        ]
    };
    qushiChart.setOption(qushioption);
});
